//鼠标拖曳效果
function moveX(x) {
    let father = document.querySelector(x)
    father.addEventListener('mousedown', function (e) {
        let x = e.pageX - this.offsetLeft
        let y = e.pageY - this.offsetTop
        console.log(x,y)
        function move(e) {
            father.style.top = e.pageY - y + 'px'
            father.style.left = e.pageX - x + 'px'
        }
        document.addEventListener('mousemove', move)
        document.addEventListener('mouseup', function () {
            document.removeEventListener('mousemove', move)
        })
    })
}